package com.atguigu.lease.common.utils;

import java.util.Random;

public class CodeUtil {
    public  static String getRandomCode(Integer length){
        StringBuffer builder = new StringBuffer();
        Random random = new Random();
        for(int i=0;i<length;i++){
            int num = random.nextInt(10);
            builder.append(num);
        }
        return builder.toString();

    }
}
